# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataproc.V1.Model.SqlExecutionUiData do
  @moduledoc """
  SQL Execution Data

  ## Attributes

  *   `completionTime` (*type:* `DateTime.t`, *default:* `nil`) - 
  *   `description` (*type:* `String.t`, *default:* `nil`) - 
  *   `details` (*type:* `String.t`, *default:* `nil`) - 
  *   `errorMessage` (*type:* `String.t`, *default:* `nil`) - 
  *   `executionId` (*type:* `String.t`, *default:* `nil`) - 
  *   `jobs` (*type:* `map()`, *default:* `nil`) - 
  *   `metricValues` (*type:* `map()`, *default:* `nil`) - 
  *   `metricValuesIsNull` (*type:* `boolean()`, *default:* `nil`) - 
  *   `metrics` (*type:* `list(GoogleApi.Dataproc.V1.Model.SqlPlanMetric.t)`, *default:* `nil`) - 
  *   `modifiedConfigs` (*type:* `map()`, *default:* `nil`) - 
  *   `physicalPlanDescription` (*type:* `String.t`, *default:* `nil`) - 
  *   `rootExecutionId` (*type:* `String.t`, *default:* `nil`) - 
  *   `stages` (*type:* `list(String.t)`, *default:* `nil`) - 
  *   `submissionTime` (*type:* `DateTime.t`, *default:* `nil`) - 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :completionTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :details => String.t() | nil,
          :errorMessage => String.t() | nil,
          :executionId => String.t() | nil,
          :jobs => map() | nil,
          :metricValues => map() | nil,
          :metricValuesIsNull => boolean() | nil,
          :metrics => list(GoogleApi.Dataproc.V1.Model.SqlPlanMetric.t()) | nil,
          :modifiedConfigs => map() | nil,
          :physicalPlanDescription => String.t() | nil,
          :rootExecutionId => String.t() | nil,
          :stages => list(String.t()) | nil,
          :submissionTime => DateTime.t() | nil
        }

  field(:completionTime, as: DateTime)
  field(:description)
  field(:details)
  field(:errorMessage)
  field(:executionId)
  field(:jobs, type: :map)
  field(:metricValues, type: :map)
  field(:metricValuesIsNull)
  field(:metrics, as: GoogleApi.Dataproc.V1.Model.SqlPlanMetric, type: :list)
  field(:modifiedConfigs, type: :map)
  field(:physicalPlanDescription)
  field(:rootExecutionId)
  field(:stages, type: :list)
  field(:submissionTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Dataproc.V1.Model.SqlExecutionUiData do
  def decode(value, options) do
    GoogleApi.Dataproc.V1.Model.SqlExecutionUiData.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.SqlExecutionUiData do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
